home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / C / Applications / POV-Ray 3.0.2 / src / MacSource / TextEditor.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-03-16  |  4.0 KB  |  125 lines  |  [TEXT/CWIE]

  1. /*==============================================================================
  2. Project:    POV-Ray
  3.  
  4. Version:    3
  5.  
  6. File:    TextEditor.h
  7.  
  8. Description:
  9.     This file contains typedefs, function prototypes and extern var declarations
  10.     that need to be exported from texteditor.c.
  11. ------------------------------------------------------------------------------
  12. Authors:
  13.     Jim Nitchals, Eduard [esp] Schwan
  14. ------------------------------------------------------------------------------
  15.     from Persistence of Vision(tm) Ray Tracer
  16.     Copyright 1996 Persistence of Vision Team
  17. ------------------------------------------------------------------------------
  18.     NOTICE: This source code file is provided so that users may experiment
  19.     with enhancements to POV-Ray and to port the software to platforms other 
  20.     than those supported by the POV-Ray Team.  There are strict rules under
  21.     which you are permitted to use this file.  The rules are in the file
  22.     named POVLEGAL.DOC which should be distributed with this file. If 
  23.     POVLEGAL.DOC is not available or for more info please contact the POV-Ray
  24.     Team Coordinator by leaving a message in CompuServe's Graphics Developer's
  25.     Forum.  The latest version of POV-Ray may be found there as well.
  26.  
  27.     This program is based on the popular DKB raytracer version 2.12.
  28.     DKBTrace was originally written by David K. Buck.
  29.     DKBTrace Ver 2.0-2.12 were written by David K. Buck & Aaron A. Collins.
  30. ------------------------------------------------------------------------------
  31. Change History:
  32.     921110    [esp]    Created
  33.     931001    [esp]    version 2.0 finished (Released on 10/4/93)
  34. ==============================================================================*/
  35.  
  36. #if !defined (TEXTEDITOR_H)
  37. #define TEXTEDITOR_H
  38.  
  39.  
  40. /*==== POV headers ====*/
  41. #include "config.h"
  42.  
  43.  
  44. /*==== Mac toolbox headers ====*/
  45.  
  46. #include <Controls.h>    // ControlHandle
  47. #include <Dialogs.h>    // DialogPtr
  48.  
  49.  
  50. /*==== External globals ====*/
  51.  
  52. #include "TE32K.h"
  53.  
  54. extern WindowPtr        gSrcWind_Window;
  55. extern Boolean            gSrcWind_dirty;
  56. extern Boolean            gSrcWind_visible;
  57. extern Str255             gSrcWind_FileName;
  58. extern short            gSrcWind_VRefNum;
  59. extern TE32KHandle        gSrcWind_TE32KH;
  60.  
  61.  
  62. /*==== TextEditor.c Prototypes ====*/
  63.  
  64. int        SetUpFiles(void);
  65. int        DoFile(int item);
  66. int        SaveAs(Str255 fn, short *vRef);
  67. int        SaveFile(Str255 fn, short vRef);
  68. int        NewFile(Str255 fn, short *vRef);
  69. int        OldFile(Str255 fn, short *vRef);
  70. int        CreateFile(Str255 fn, short *vRef, short *theRef);
  71. int        WriteFile(short refNum, char *p, long num);
  72. int        ReadFile(short refNum);
  73. int        pStrCopy(StringPtr p1, StringPtr p2);
  74. int        FileError(Str255 s, Str255 f);
  75. void    PreInitWindows(void);
  76. int        SetUpWindows(void);
  77. int        SetVScroll(void);
  78. int        ShowSelect(void);
  79. void    SelectAllText(void);
  80. int        SetView(WindowPtr w);
  81. int        UpdateWindow(WindowPtr theWindow);
  82. void    ScrollEditHome(void);
  83. void    ScrollEditEnd(void);
  84. void    ScrollEditPage(short thePartCode);
  85. int        DoContent(WindowPtr theWindow, EventRecord *theEvent);
  86.  
  87. long    GetSrcWindselStart(void);
  88. long    GetSrcWindselEnd(void);
  89. long    GetSrcWindteLength(void);
  90. Handle    GetSrcWindhText(void);
  91. void    SrcWindCutSelToClipboard(void);
  92. void    SrcWindPasteFromClipboard(void);
  93. void    SrcWindCopySelToClipboard(void);
  94. void    SrcWindClearSel(void);
  95. void    SrcWindSetSelect(long selStart, long selEnd);
  96. void    SrcWindDeleteAllText(void);
  97. void    SrcWindTEKey(char theKey);
  98. void    SrcWindTEDeleteLeftCharKey(void);
  99. void    SrcWindTEDeleteRightCharKey(void);
  100. void    DoSrcWindTextInsert(char * someTextPtr, long someTextSize);
  101. void    GotoSrcWindLine(short line_to_go);
  102. void    MatchBracesAtCurSel(void);
  103.  
  104. void    MyResizeWindow(WindowPtr w, short h, short v);
  105. int        CloseMyWindow(void);
  106. int        DoActivateEditor(Boolean becomingActive);
  107. void    Init_Editor(void); 
  108. int        DoEditMouseDown(int windowPart, WindowPtr whichWindow, EventRecord *myEvent);
  109. void    SrcWindMaintainCursor(void);
  110.  
  111. void SrcWindUndo(void);
  112. void SrcWindRedo(void);
  113.  
  114.  
  115. // ==============================================
  116. // Check if undo is available
  117. #define CheckSrcWindCanUndo() Check_CanUndo()
  118.  
  119. // ==============================================
  120. // Check if redo is available
  121. #define CheckSrcWindCanRedo() Check_CanRedo()
  122.  
  123.  
  124. #endif // TEXTEDITOR_H
  125.